home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2011 April / ME_2011_04.iso / [Video-Tutorial] / 9430830 / qicknavigation.swf / scripts / __Packages / zigo / tweenManager.as
Encoding:
Text File  |  2009-08-24  |  22.7 KB  |  767 lines

  1. class zigo.tweenManager
  2. {
  3.    var playing;
  4.    var autoStop;
  5.    var broadcastEvents;
  6.    var autoOverwrite;
  7.    var ints;
  8.    var lockedTweens;
  9.    var tweenList;
  10.    var updateTime;
  11.    var tweenHolder;
  12.    var updateIntId;
  13.    var now;
  14.    var _th_depth = 6789;
  15.    function tweenManager()
  16.    {
  17.       this.playing = false;
  18.       this.autoStop = false;
  19.       this.broadcastEvents = false;
  20.       this.autoOverwrite = true;
  21.       this.ints = new Array();
  22.       this.lockedTweens = new Object();
  23.       this.tweenList = new Array();
  24.    }
  25.    function cleanUp()
  26.    {
  27.       if(!(this.tweenList instanceof Array && this.tweenList.length > 0))
  28.       {
  29.          return undefined;
  30.       }
  31.       for(var _loc2_ in this.tweenList)
  32.       {
  33.          if(this.tweenList[_loc2_].mc._x == undefined)
  34.          {
  35.             this.tweenList.splice(Number(_loc2_),1);
  36.          }
  37.       }
  38.       if(this.tweenList.length == 0)
  39.       {
  40.          this.tweenList = [];
  41.          this.deinit();
  42.       }
  43.       for(_loc2_ in this.ints)
  44.       {
  45.          if(this.ints[_loc2_] != undefined && this.ints[_loc2_].mc._x == undefined)
  46.          {
  47.             this.removeDelayedTween(Number(_loc2_));
  48.          }
  49.       }
  50.    }
  51.    function set updateInterval(time)
  52.    {
  53.       if(this.playing)
  54.       {
  55.          this.deinit();
  56.          this.updateTime = time;
  57.          this.init();
  58.       }
  59.       else
  60.       {
  61.          this.updateTime = time;
  62.       }
  63.    }
  64.    function get updateInterval()
  65.    {
  66.       return this.updateTime;
  67.    }
  68.    function set controllerDepth(v)
  69.    {
  70.       if(_global.isNaN(v) == true)
  71.       {
  72.          return;
  73.       }
  74.       if(this.tweenHolder._name != undefined)
  75.       {
  76.          this.tweenHolder.swapDepths(v);
  77.       }
  78.       else
  79.       {
  80.          this._th_depth = v;
  81.       }
  82.    }
  83.    function get controllerDepth()
  84.    {
  85.       return this._th_depth;
  86.    }
  87.    function init()
  88.    {
  89.       if(this.updateTime > 0)
  90.       {
  91.          clearInterval(this.updateIntId);
  92.          this.updateIntId = setInterval(this,"update",this.updateTime);
  93.       }
  94.       else
  95.       {
  96.          if(this.tweenHolder._name == undefined)
  97.          {
  98.             this.tweenHolder = _root.createEmptyMovieClip("_th_",this._th_depth);
  99.          }
  100.          var tm = this;
  101.          this.tweenHolder.onEnterFrame = function()
  102.          {
  103.             tm.update.call(tm);
  104.          };
  105.       }
  106.       this.playing = true;
  107.       this.now = getTimer();
  108.    }
  109.    function deinit()
  110.    {
  111.       this.playing = false;
  112.       clearInterval(this.updateIntId);
  113.       delete this.tweenHolder.onEnterFrame;
  114.    }
  115.    function update()
  116.    {
  117.       var _loc3_ = undefined;
  118.       var _loc11_ = undefined;
  119.       var _loc4_ = undefined;
  120.       var _loc14_ = false;
  121.       _loc11_ = this.tweenList.length;
  122.       if(this.broadcastEvents)
  123.       {
  124.          var _loc5_ = undefined;
  125.          var _loc8_ = undefined;
  126.          var _loc6_ = undefined;
  127.          var _loc10_ = undefined;
  128.          _loc5_ = {};
  129.          _loc8_ = {};
  130.          _loc6_ = {};
  131.          _loc10_ = {};
  132.       }
  133.       while(_loc11_--)
  134.       {
  135.          _loc3_ = this.tweenList[_loc11_];
  136.          if(_loc3_.mc._x == undefined)
  137.          {
  138.             _loc14_ = true;
  139.          }
  140.          else if(_loc3_.pt == -1)
  141.          {
  142.             if(_loc3_.ts + _loc3_.d > this.now)
  143.             {
  144.                if(_loc3_.ctm == undefined)
  145.                {
  146.                   if(_global.allowRounding)
  147.                   {
  148.                      _loc3_.mc[_loc3_.pp] = Math.round(_loc3_.ef(this.now - _loc3_.ts,_loc3_.ps,_loc3_.ch,_loc3_.d,_loc3_.e1,_loc3_.e2));
  149.                   }
  150.                   else
  151.                   {
  152.                      _loc3_.mc[_loc3_.pp] = _loc3_.ef(this.now - _loc3_.ts,_loc3_.ps,_loc3_.ch,_loc3_.d,_loc3_.e1,_loc3_.e2);
  153.                   }
  154.                }
  155.                else
  156.                {
  157.                   var _loc9_ = {};
  158.                   for(_loc4_ in _loc3_.ctm)
  159.                   {
  160.                      _loc9_[_loc4_] = _loc3_.ef(this.now - _loc3_.ts,_loc3_.stm[_loc4_],_loc3_.ctm[_loc4_],_loc3_.d,_loc3_.e1,_loc3_.e2);
  161.                   }
  162.                   _loc3_.c.setTransform(_loc9_);
  163.                }
  164.                if(this.broadcastEvents)
  165.                {
  166.                   if(_loc5_[targetPath(_loc3_.mc)] == undefined)
  167.                   {
  168.                      _loc5_[targetPath(_loc3_.mc)] = _loc3_.mc;
  169.                   }
  170.                   if(_loc6_[targetPath(_loc3_.mc)] == undefined)
  171.                   {
  172.                      _loc6_[targetPath(_loc3_.mc)] = [];
  173.                   }
  174.                   _loc6_[targetPath(_loc3_.mc)].push(_loc3_.ctm == undefined ? _loc3_.pp : "_ct_");
  175.                }
  176.                if(_loc3_.cb.updfunc != undefined)
  177.                {
  178.                   var _loc7_ = _loc3_.cb.updfunc;
  179.                   if(typeof _loc7_ == "string" && _loc3_.cb.updscope != undefined)
  180.                   {
  181.                      _loc7_ = _loc3_.cb.updscope[_loc7_];
  182.                   }
  183.                   _loc7_.apply(_loc3_.cb.updscope,_loc3_.cb.updargs);
  184.                }
  185.             }
  186.             else
  187.             {
  188.                if(_loc3_.ctm == undefined)
  189.                {
  190.                   _loc3_.mc[_loc3_.pp] = _loc3_.ps + _loc3_.ch;
  191.                }
  192.                else
  193.                {
  194.                   _loc9_ = {};
  195.                   for(_loc4_ in _loc3_.ctm)
  196.                   {
  197.                      _loc9_[_loc4_] = _loc3_.stm[_loc4_] + _loc3_.ctm[_loc4_];
  198.                   }
  199.                   _loc3_.c.setTransform(_loc9_);
  200.                }
  201.                if(this.broadcastEvents)
  202.                {
  203.                   if(_loc5_[targetPath(_loc3_.mc)] == undefined)
  204.                   {
  205.                      _loc5_[targetPath(_loc3_.mc)] = _loc3_.mc;
  206.                   }
  207.                   if(_loc8_[targetPath(_loc3_.mc)] == undefined)
  208.                   {
  209.                      _loc8_[targetPath(_loc3_.mc)] = _loc3_.mc;
  210.                   }
  211.                   if(_loc6_[targetPath(_loc3_.mc)] == undefined)
  212.                   {
  213.                      _loc6_[targetPath(_loc3_.mc)] = [];
  214.                   }
  215.                   _loc6_[targetPath(_loc3_.mc)].push(_loc3_.ctm == undefined ? _loc3_.pp : "_ct_");
  216.                   if(_loc10_[targetPath(_loc3_.mc)] == undefined)
  217.                   {
  218.                      _loc10_[targetPath(_loc3_.mc)] = [];
  219.                   }
  220.                   _loc10_[targetPath(_loc3_.mc)].push(_loc3_.ctm == undefined ? _loc3_.pp : "_ct_");
  221.                }
  222.                if(_loc3_.cb.updfunc != undefined)
  223.                {
  224.                   _loc7_ = _loc3_.cb.updfunc;
  225.                   if(typeof _loc7_ == "string" && _loc3_.cb.updscope != undefined)
  226.                   {
  227.                      _loc7_ = _loc3_.cb.updscope[_loc7_];
  228.                   }
  229.                   _loc7_.updfunc.apply(_loc3_.cb.updscope,_loc3_.cb.updargs);
  230.                }
  231.                if(endt == undefined)
  232.                {
  233.                   var endt = new Array();
  234.                }
  235.                endt.push(_loc11_);
  236.             }
  237.          }
  238.       }
  239.       if(_loc14_)
  240.       {
  241.          this.cleanUp();
  242.       }
  243.       for(_loc4_ in _loc5_)
  244.       {
  245.          _loc5_[_loc4_].broadcastMessage("onTweenUpdate",{target:_loc5_[_loc4_],props:_loc6_[_loc4_]});
  246.       }
  247.       if(endt != undefined)
  248.       {
  249.          this.endTweens(endt);
  250.       }
  251.       for(_loc4_ in _loc8_)
  252.       {
  253.          _loc8_[_loc4_].broadcastMessage("onTweenEnd",{target:_loc8_[_loc4_],props:_loc10_[_loc4_]});
  254.       }
  255.       this.now = getTimer();
  256.       if(this.updateTime > 0)
  257.       {
  258.          updateAfterEvent();
  259.       }
  260.    }
  261.    function endTweens(tid_arr)
  262.    {
  263.       var _loc2_ = undefined;
  264.       var _loc9_ = undefined;
  265.       var _loc3_ = undefined;
  266.       var _loc5_ = undefined;
  267.       var _loc8_ = undefined;
  268.       _loc2_ = [];
  269.       _loc9_ = tid_arr.length;
  270.       _loc3_ = 0;
  271.       while(_loc3_ < _loc9_)
  272.       {
  273.          _loc5_ = this.tweenList[tid_arr[_loc3_]].cb;
  274.          if(_loc5_ != undefined)
  275.          {
  276.             var _loc6_ = true;
  277.             for(_loc8_ in _loc2_)
  278.             {
  279.                if(_loc2_[_loc8_] == _loc5_)
  280.                {
  281.                   _loc6_ = false;
  282.                   break;
  283.                }
  284.             }
  285.             if(_loc6_)
  286.             {
  287.                _loc2_.push(_loc5_);
  288.             }
  289.          }
  290.          this.tweenList.splice(tid_arr[_loc3_],1);
  291.          _loc3_ = _loc3_ + 1;
  292.       }
  293.       _loc3_ = 0;
  294.       while(_loc3_ < _loc2_.length)
  295.       {
  296.          var _loc4_ = _loc2_[_loc3_].func;
  297.          if(typeof _loc4_ == "string" && _loc2_[_loc3_].scope != undefined)
  298.          {
  299.             _loc4_ = _loc2_[_loc3_].scope[_loc4_];
  300.          }
  301.          _loc4_.apply(_loc2_[_loc3_].scope,_loc2_[_loc3_].args);
  302.          _loc3_ = _loc3_ + 1;
  303.       }
  304.       if(this.tweenList.length == 0)
  305.       {
  306.          this.deinit();
  307.       }
  308.    }
  309.    function removeDelayedTween(index)
  310.    {
  311.       clearInterval(this.ints[index].intid);
  312.       this.ints[index] = undefined;
  313.       var _loc2_ = true;
  314.       for(var _loc3_ in this.ints)
  315.       {
  316.          if(this.ints[_loc3_] != undefined)
  317.          {
  318.             _loc2_ = false;
  319.             break;
  320.          }
  321.       }
  322.       if(_loc2_)
  323.       {
  324.          this.ints = [];
  325.       }
  326.    }
  327.    function addTween(mc, props, pEnd, sec, eqFunc, callback, extra1, extra2)
  328.    {
  329.       var _loc4_ = undefined;
  330.       var _loc13_ = undefined;
  331.       var _loc6_ = undefined;
  332.       var _loc3_ = undefined;
  333.       var _loc2_ = undefined;
  334.       if(!this.playing)
  335.       {
  336.          this.init();
  337.       }
  338.       var _loc12_ = [];
  339.       for(_loc4_ in props)
  340.       {
  341.          _loc13_ = props[_loc4_];
  342.          _loc6_ = true;
  343.          if(_loc13_.substr(0,4) != "_ct_")
  344.          {
  345.             var _loc17_ = typeof pEnd[_loc4_] != "string" ? pEnd[_loc4_] - mc[_loc13_] : Number(pEnd[_loc4_]);
  346.             if(this.autoOverwrite)
  347.             {
  348.                for(_loc3_ in this.tweenList)
  349.                {
  350.                   _loc2_ = this.tweenList[_loc3_];
  351.                   if(_loc2_.mc == mc && _loc2_.pp == _loc13_)
  352.                   {
  353.                      _loc2_.ps = mc[_loc13_];
  354.                      _loc2_.ch = _loc17_;
  355.                      _loc2_.ts = this.now;
  356.                      _loc2_.d = sec * 1000;
  357.                      _loc2_.ef = eqFunc;
  358.                      _loc2_.cb = callback;
  359.                      _loc2_.e1 = extra1;
  360.                      _loc2_.e2 = extra2;
  361.                      _loc2_.pt = -1;
  362.                      _loc6_ = false;
  363.                      _loc12_.push(_loc2_.pp);
  364.                      break;
  365.                   }
  366.                }
  367.             }
  368.             if(_loc6_)
  369.             {
  370.                this.tweenList.unshift({mc:mc,pp:_loc13_,ps:mc[_loc13_],ch:_loc17_,ts:this.now,d:sec * 1000,ef:eqFunc,cb:callback,e1:extra1,e2:extra2,pt:-1});
  371.             }
  372.          }
  373.          else
  374.          {
  375.             var _loc16_ = new Color(mc);
  376.             var _loc20_ = _loc16_.getTransform();
  377.             var _loc19_ = {};
  378.             for(_loc3_ in pEnd[_loc4_])
  379.             {
  380.                if(pEnd[_loc4_][_loc3_] != _loc20_[_loc3_] && pEnd[_loc4_][_loc3_] != undefined)
  381.                {
  382.                   _loc19_[_loc3_] = typeof pEnd[_loc4_][_loc3_] != "string" ? pEnd[_loc4_][_loc3_] - _loc20_[_loc3_] : _loc20_[_loc3_] + Number(pEnd[_loc4_][_loc3_]);
  383.                }
  384.             }
  385.             if(this.autoOverwrite)
  386.             {
  387.                for(_loc3_ in this.tweenList)
  388.                {
  389.                   _loc2_ = this.tweenList[_loc3_];
  390.                   if(_loc2_.mc == mc && _loc2_.ctm != undefined)
  391.                   {
  392.                      _loc2_.c = _loc16_;
  393.                      _loc2_.stm = _loc20_;
  394.                      _loc2_.ctm = _loc19_;
  395.                      _loc2_.ts = this.now;
  396.                      _loc2_.d = sec * 1000;
  397.                      _loc2_.ef = eqFunc;
  398.                      _loc2_.cb = callback;
  399.                      _loc2_.e1 = extra1;
  400.                      _loc2_.e2 = extra2;
  401.                      _loc2_.pt = -1;
  402.                      _loc6_ = false;
  403.                      _loc12_.push("_ct_");
  404.                      break;
  405.                   }
  406.                }
  407.             }
  408.             if(_loc6_)
  409.             {
  410.                this.tweenList.unshift({mc:mc,c:_loc16_,stm:_loc20_,ctm:_loc19_,ts:this.now,d:sec * 1000,ef:eqFunc,cb:callback,e1:extra1,e2:extra2,pt:-1});
  411.             }
  412.          }
  413.       }
  414.       if(this.broadcastEvents)
  415.       {
  416.          if(_loc12_.length > 0)
  417.          {
  418.             mc.broadcastMessage("onTweenInterrupt",{target:mc,props:_loc12_});
  419.          }
  420.          mc.broadcastMessage("onTweenStart",{target:mc,props:props});
  421.       }
  422.       if(callback.startfunc != undefined)
  423.       {
  424.          var _loc27_ = callback.startfunc;
  425.          if(typeof _loc27_ == "string" && callback.startscope != undefined)
  426.          {
  427.             _loc27_ = callback.startscope[_loc27_];
  428.          }
  429.          _loc27_.apply(callback.startscope,callback.startargs);
  430.       }
  431.       if(sec == 0)
  432.       {
  433.          this.update();
  434.       }
  435.    }
  436.    function addTweenWithDelay(delay, mc, props, pEnd, sec, eqFunc, callback, extra1, extra2)
  437.    {
  438.       var il;
  439.       var _loc3_ = undefined;
  440.       il = this.ints.length;
  441.       _loc3_ = setInterval(function(obj)
  442.       {
  443.          obj.removeDelayedTween(il);
  444.          if(mc._x != undefined)
  445.          {
  446.             obj.addTween(mc,props,pEnd,sec,eqFunc,callback,extra1,extra2);
  447.          }
  448.       }
  449.       ,delay * 1000,this);
  450.       this.ints[il] = {mc:mc,props:props,pend:pEnd,intid:_loc3_,st:getTimer(),delay:delay * 1000,args:arguments.slice(1),pt:-1};
  451.       if(!this.playing)
  452.       {
  453.          this.init();
  454.       }
  455.    }
  456.    function removeTween(mc, props)
  457.    {
  458.       var _loc8_ = undefined;
  459.       var _loc2_ = undefined;
  460.       var _loc5_ = undefined;
  461.       _loc8_ = false;
  462.       if(props == undefined && this.broadcastEvents != true)
  463.       {
  464.          _loc8_ = true;
  465.       }
  466.       _loc2_ = this.tweenList.length;
  467.       var _loc4_ = {};
  468.       while(_loc2_--)
  469.       {
  470.          if(this.tweenList[_loc2_].mc == mc)
  471.          {
  472.             if(_loc8_)
  473.             {
  474.                this.tweenList.splice(_loc2_,1);
  475.             }
  476.             else
  477.             {
  478.                for(_loc5_ in props)
  479.                {
  480.                   if(this.tweenList[_loc2_].pp == props[_loc5_])
  481.                   {
  482.                      this.tweenList.splice(_loc2_,1);
  483.                      if(_loc4_[targetPath(mc)] == undefined)
  484.                      {
  485.                         _loc4_[targetPath(mc)] = {t:mc,p:[]};
  486.                      }
  487.                      _loc4_[targetPath(mc)].p.push(props[_loc5_]);
  488.                   }
  489.                   else if(props[_loc5_] == "_ct_" && this.tweenList[_loc2_].ctm != undefined && this.tweenList[_loc2_].mc == mc)
  490.                   {
  491.                      this.tweenList.splice(_loc2_,1);
  492.                      if(_loc4_[targetPath(mc)] == undefined)
  493.                      {
  494.                         _loc4_[targetPath(mc)] = {t:mc,p:[]};
  495.                      }
  496.                      _loc4_[targetPath(mc)].p.push("_ct_");
  497.                   }
  498.                }
  499.             }
  500.          }
  501.       }
  502.       _loc2_ = this.ints.length;
  503.       while(_loc2_--)
  504.       {
  505.          if(this.ints[_loc2_].mc == mc)
  506.          {
  507.             if(_loc8_)
  508.             {
  509.                this.removeDelayedTween(Number(_loc2_));
  510.             }
  511.             else
  512.             {
  513.                for(_loc5_ in props)
  514.                {
  515.                   for(var _loc11_ in this.ints[_loc2_].props)
  516.                   {
  517.                      if(this.ints[_loc2_].props[_loc11_] == props[_loc5_])
  518.                      {
  519.                         this.ints[_loc2_].props.splice(_loc11_,1);
  520.                         this.ints[_loc2_].pend.splice(_loc11_,1);
  521.                         if(_loc4_[targetPath(mc)] == undefined)
  522.                         {
  523.                            _loc4_[targetPath(mc)] = {t:mc,p:[]};
  524.                         }
  525.                         _loc4_[targetPath(mc)].p.push(props[_loc5_]);
  526.                      }
  527.                   }
  528.                   if(this.ints[_loc2_].props.length == 0)
  529.                   {
  530.                      clearInterval(this.ints[_loc2_].intid);
  531.                   }
  532.                }
  533.             }
  534.          }
  535.       }
  536.       if(this.broadcastEvents)
  537.       {
  538.          for(_loc11_ in _loc4_)
  539.          {
  540.             if(_loc4_[_loc11_].p.length > 0)
  541.             {
  542.                _loc4_[_loc11_].t.broadcastMessage("onTweenInterrupt",{target:_loc4_[_loc11_].t,props:_loc4_[_loc11_].p});
  543.             }
  544.          }
  545.       }
  546.       if(this.tweenList.length == 0)
  547.       {
  548.          this.deinit();
  549.       }
  550.    }
  551.    function isTweening(mc, prop)
  552.    {
  553.       var _loc4_ = prop == undefined;
  554.       for(var _loc6_ in this.tweenList)
  555.       {
  556.          var _loc2_ = this.tweenList[_loc6_];
  557.          if(this.tweenList[_loc6_].mc == mc && this.tweenList[_loc6_].pt == -1 && (_loc4_ || prop == _loc2_.pp || prop == "_ct_" && _loc2_.ctm != undefined))
  558.          {
  559.             return true;
  560.          }
  561.       }
  562.       return false;
  563.    }
  564.    function getTweens(mc)
  565.    {
  566.       var _loc2_ = 0;
  567.       for(var _loc4_ in this.tweenList)
  568.       {
  569.          if(this.tweenList[_loc4_].mc == mc)
  570.          {
  571.             _loc2_ = _loc2_ + 1;
  572.          }
  573.       }
  574.       return _loc2_;
  575.    }
  576.    function lockTween(mc, bool)
  577.    {
  578.       this.lockedTweens[targetPath(mc)] = bool;
  579.    }
  580.    function isTweenLocked(mc)
  581.    {
  582.       if(this.lockedTweens[targetPath(mc)] == undefined)
  583.       {
  584.          return false;
  585.       }
  586.       return this.lockedTweens[targetPath(mc)];
  587.    }
  588.    function ffTween(mc, propsObj)
  589.    {
  590.       var _loc4_ = mc == undefined;
  591.       var _loc6_ = propsObj == undefined;
  592.       for(var _loc8_ in this.tweenList)
  593.       {
  594.          var _loc2_ = this.tweenList[_loc8_];
  595.          if((_loc2_.mc == mc || _loc4_) && (_loc6_ || propsObj[_loc2_.pp] == true))
  596.          {
  597.             if(_loc2_.pt != -1)
  598.             {
  599.                _loc2_.pt = -1;
  600.             }
  601.             _loc2_.ts = this.now - _loc2_.d;
  602.          }
  603.       }
  604.       for(_loc8_ in this.ints)
  605.       {
  606.          if(this.ints[_loc8_] != undefined)
  607.          {
  608.             if(this.ints[_loc8_].mc == mc || _loc4_)
  609.             {
  610.                if(this.ints[_loc8_].mc._x != undefined)
  611.                {
  612.                   var _loc3_ = this.ints[_loc8_].args;
  613.                   _loc3_[3] = 0;
  614.                   this.addTween.apply(this,_loc3_);
  615.                }
  616.                this.removeDelayedTween(Number(_loc8_));
  617.             }
  618.          }
  619.       }
  620.       this.update();
  621.    }
  622.    function rewTween(mc, propsObj)
  623.    {
  624.       var _loc3_ = mc == undefined;
  625.       var _loc5_ = propsObj == undefined;
  626.       for(var _loc7_ in this.tweenList)
  627.       {
  628.          var _loc2_ = this.tweenList[_loc7_];
  629.          if((_loc2_.mc == mc || _loc3_) && (_loc5_ || propsObj[_loc2_.pp] == true))
  630.          {
  631.             if(_loc2_.pt != -1)
  632.             {
  633.                _loc2_.pt = -1;
  634.             }
  635.             _loc2_.ts = this.now;
  636.          }
  637.       }
  638.       for(_loc7_ in this.ints)
  639.       {
  640.          if(this.ints[_loc7_] != undefined)
  641.          {
  642.             if(this.ints[_loc7_].mc == mc || _loc3_)
  643.             {
  644.                if(this.ints[_loc7_].mc._x != undefined)
  645.                {
  646.                   this.addTween.apply(this,this.ints[_loc7_].args);
  647.                }
  648.                this.removeDelayedTween(Number(_loc7_));
  649.             }
  650.          }
  651.       }
  652.       this.update();
  653.    }
  654.    function isTweenPaused(mc, prop)
  655.    {
  656.       if(mc == undefined)
  657.       {
  658.          return null;
  659.       }
  660.       var _loc5_ = prop == undefined;
  661.       for(var _loc6_ in this.tweenList)
  662.       {
  663.          var _loc2_ = this.tweenList[_loc6_];
  664.          if(this.tweenList[_loc6_].mc == mc && (_loc5_ || prop == _loc2_.pp || prop == "_ct_" && _loc2_.ctm != undefined))
  665.          {
  666.             return Boolean(this.tweenList[_loc6_].pt != -1);
  667.          }
  668.       }
  669.       for(_loc6_ in this.ints)
  670.       {
  671.          if(this.ints[_loc6_] != undefined && this.ints[_loc6_].mc == mc)
  672.          {
  673.             return Boolean(this.ints[_loc6_].pt != -1);
  674.          }
  675.       }
  676.       return false;
  677.    }
  678.    function pauseTween(mc, propsObj)
  679.    {
  680.       var _loc3_ = mc == undefined;
  681.       if(_loc3_ == false && this.isTweenPaused(mc) == true)
  682.       {
  683.          return undefined;
  684.       }
  685.       var _loc6_ = propsObj == undefined;
  686.       for(var _loc7_ in this.tweenList)
  687.       {
  688.          var _loc2_ = this.tweenList[_loc7_];
  689.          if(_loc2_.pt == -1 && (_loc2_.mc == mc || _loc3_) && (_loc6_ || propsObj[_loc2_.pp] == true || propsObj._ct_ != undefined && _loc2_.ctm != undefined))
  690.          {
  691.             _loc2_.pt = this.now;
  692.          }
  693.       }
  694.       for(_loc7_ in this.ints)
  695.       {
  696.          if(this.ints[_loc7_] != undefined)
  697.          {
  698.             if(this.ints[_loc7_].pt == -1 && (this.ints[_loc7_].mc == mc || _loc3_))
  699.             {
  700.                this.ints[_loc7_].pt = this.now;
  701.             }
  702.          }
  703.       }
  704.    }
  705.    function unpauseTween(mc, propsObj)
  706.    {
  707.       var _loc4_ = mc == undefined;
  708.       if(_loc4_ == false && this.isTweenPaused(mc) === false)
  709.       {
  710.          return undefined;
  711.       }
  712.       var _loc7_ = propsObj == undefined;
  713.       if(!this.playing)
  714.       {
  715.          this.init();
  716.       }
  717.       for(var _loc2_ in this.tweenList)
  718.       {
  719.          var _loc3_ = this.tweenList[_loc2_];
  720.          if(_loc3_.pt != -1 && (_loc3_.mc == mc || _loc4_) && (_loc7_ || propsObj[_loc3_.pp] == true) || propsObj._ct_ != undefined && _loc3_.ctm != undefined)
  721.          {
  722.             _loc3_.ts = this.now - (_loc3_.pt - _loc3_.ts);
  723.             _loc3_.pt = -1;
  724.          }
  725.       }
  726.       for(_loc2_ in this.ints)
  727.       {
  728.          if(this.ints[_loc2_] != undefined)
  729.          {
  730.             if(this.ints[_loc2_].pt != -1 && (this.ints[_loc2_].mc == mc || _loc4_))
  731.             {
  732.                this.ints[_loc2_].delay -= this.ints[_loc2_].pt - this.ints[_loc2_].st;
  733.                this.ints[_loc2_].st = this.now;
  734.                this.ints[_loc2_].intid = setInterval(function(obj, id)
  735.                {
  736.                   obj.addTween.apply(obj,obj.ints[id].args);
  737.                   clearInterval(obj.ints[id].intid);
  738.                   obj.ints[id] = undefined;
  739.                }
  740.                ,this.ints[_loc2_].delay,this,_loc2_);
  741.             }
  742.          }
  743.       }
  744.    }
  745.    function pauseAll()
  746.    {
  747.       this.pauseTween();
  748.    }
  749.    function unpauseAll()
  750.    {
  751.       this.unpauseTween();
  752.    }
  753.    function stopAll()
  754.    {
  755.       for(var _loc2_ in this.ints)
  756.       {
  757.          this.removeDelayedTween(Number(_loc2_));
  758.       }
  759.       this.tweenList = new Array();
  760.       this.deinit();
  761.    }
  762.    function toString()
  763.    {
  764.       return "[AS2 tweenManager 1.2.0]";
  765.    }
  766. }
  767.